<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script type="text/javascript" charset="utf-8">
        //桥接模式
        var PublicClass = function () {
            var privateMethod = function () {
                alert('执行了一个很复杂的操作...');
            }
            /**
             * 通过特权函数访问这个私用的独立单元
             */
            this.bridgeMethod = function () {
                return privateMethod();
            }
        }
        var p1 = new PublicClass();
        p1.bridgeMethod();
    </script>
</head>
<body>
</body>
</html>